home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 19 / Mac Magazin and MacEasy Magazine CD - Issue 19.iso / Grafik & Text & Film / Quark XTensions / Freeware Xtensions / Quark AppleScript Scripts / Scripts (text only) / Auxiliary Dictionary Manager next >
Text File  |  1994-05-02  |  895b  |  33 lines

  1. --Copyright 1994 Quark, Inc.   All rights reserved.
  2.  
  3.  
  4. on open y
  5.     set marc to display dialog "                 Auxiliary Dictionary Manager" buttons {"Cancel", "Close", "Open/Switch"}
  6.     if button returned of marc = "Close" then
  7.         tell application "QuarkXPress™"
  8.             set n to null
  9.         end tell
  10.     else if button returned of marc = "Open/Switch" then
  11.         set n to {choose file of type {"TEXT"} with prompt "Select a QuarkXPress™ Auxilliary Dictionary."}
  12.     end if
  13.     set x to 1
  14.     repeat number of items in y times
  15.         set docname to item x of y as string
  16.         set z to info for item x of y
  17.         if z is not folder then
  18.             if z's file type is not "XDOC" then
  19.                 beep 1
  20.             else
  21.                 tell application "QuarkXPress™"
  22.                     open item x of y
  23.                     set auxiliary dictionary path of document 1 to n
  24.                     save document 1
  25.                     close document 1
  26.                 end tell
  27.             end if
  28.             set x to x + 1
  29.         else
  30.             beep 1
  31.         end if
  32.     end repeat
  33. end open